package top.hidoctor.auscultation.net;

import com.tang.base.BaseResponse;
import com.tang.base.Request;
import com.tang.user.UserInfo;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.DELETE;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Part;
import retrofit2.http.Path;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;
import top.hidoctor.auscultation.bean.ArbitrationBean;
import top.hidoctor.auscultation.bean.AuditBean;
import top.hidoctor.auscultation.bean.AuditListBean;
import top.hidoctor.auscultation.bean.BaizhubaoListBean;
import top.hidoctor.auscultation.bean.DictionaryBean;
import top.hidoctor.auscultation.bean.DifficultBean;
import top.hidoctor.auscultation.bean.Hospitalbean;
import top.hidoctor.auscultation.bean.LabelListBean;
import top.hidoctor.auscultation.bean.LableBean;
import top.hidoctor.auscultation.bean.MarkDetailBean;
import top.hidoctor.auscultation.bean.NewsBean;
import top.hidoctor.auscultation.bean.PatientBean;
import top.hidoctor.auscultation.bean.PatientsBean;
import top.hidoctor.auscultation.bean.SPBean;
import top.hidoctor.auscultation.bean.SampleBean;
import top.hidoctor.auscultation.bean.ScreenDetailBean;
import top.hidoctor.auscultation.bean.ShaichaBean;
import top.hidoctor.auscultation.bean.User;
import top.hidoctor.auscultation.bean.UserBean;
import top.hidoctor.auscultation.bean.YangbenBean;

public interface Api {
    /**
     * 发送验证码
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @POST("sms")
    Observable<BaseResponse<Object>> sendSms(@Body RequestBody body);

    /**
     * 登陆
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @POST("login")
    Observable<BaseResponse<UserInfo>> login(@Body RequestBody body);

    /**
     * 注册
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @POST("signup")
    Observable<BaseResponse<Object>> signup(@Body RequestBody body);

    /**
     * 完善信息
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @PUT("signup/{id}")
    Observable<BaseResponse<Object>> completeInfo(@Path("id") String id, @Body RequestBody body);

    /**
     * 患者列表
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @GET("patient")
    Observable<BaseResponse<PatientsBean>> patient(@QueryMap Map<String, Object> map);

    /**
     * 患者详情
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @GET("patient/{id}")
    Observable<BaseResponse<PatientBean>> patientDetail(@Path("id") String id, @QueryMap Map<String, Object> map);

    /**
     * 患者详情更新
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @PUT("patient/{id}")
    Observable<BaseResponse<Object>> patientDetailUpdate(@Path("id") String id, @Body RequestBody body);

    /**
     * 新增患者
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @POST("patient")
    Observable<BaseResponse<Object>> addPatient(@Body RequestBody body);

    /**
     * 图片上传
     *
     * @param
     * @return
     */
    @Multipart
    @POST("file")
    Observable<BaseResponse<String>> uploadFile(@Part("type") RequestBody type, @Part MultipartBody.Part file);


    @Headers({"Content-Type:application/json"})
    @GET("label")
    Observable<BaseResponse<BaizhubaoListBean>> label(@QueryMap Map<String, Object> map);

    /**
     * 删除标注包
     *
     * @param type
     * @param map
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @DELETE("label/{id}")
    Observable<BaseResponse<Object>> deleteLabel(@Part("type") String type, @QueryMap Map<String, Object> map);

    /**
     * 筛选列表
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @GET("screening")
    Observable<BaseResponse<ShaichaBean>> screenList(@QueryMap Map<String, Object> map);


    /**
     * 筛选详情
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @GET("screening/{id}")
    Observable<BaseResponse<ScreenDetailBean>> screenDetail(@Path("id") String id, @QueryMap Map<String, Object> map);

    /**
     * 更新筛选详情
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @PUT("screening/{id}")
    Observable<BaseResponse<Object>> screenUpdate(@Path("id") String id, @Body RequestBody body);

    /**
     * 筛选新增
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @POST("screening")
    Observable<BaseResponse<Object>> addScreen(@Body RequestBody body);

    /**
     * 筛选详情
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @POST("screening/{id}/assess")
    Observable<BaseResponse<Object>> screenAssess(@Path("id") String id, @Body RequestBody body);

    /**
     * 我的心音样本
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @GET("sample")
    Observable<BaseResponse<SampleBean>> sampleList(@QueryMap Map<String, Object> map);

    /**
     * 新增我的心音样本
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @POST("sample")
    Observable<BaseResponse<Object>> addSample(@Body RequestBody body);

    /**
     * 样本仲裁列表
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @GET("arbitration")
    Observable<BaseResponse<ArbitrationBean>> arbitrationList(@QueryMap Map<String, Object> map);

    /**
     * 审核任务包列表
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @GET("audit")
    Observable<BaseResponse<AuditListBean>> auditList(@QueryMap Map<String, Object> map);

    /**
     * 审核任务包删除
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @DELETE("audit/{id}")
    Observable<BaseResponse<Object>> deleteAudit(@Path("id") String id, @QueryMap Map<String, Object> map);

    /**
     * 审核任务包詳情
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @GET("audit/{id}")
    Observable<BaseResponse<AuditBean>> auditDetail(@Path("id") String id, @QueryMap Map<String, Object> map);

    /**
     * 标注包列表（工作台）
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @GET("label")
    Observable<BaseResponse<LabelListBean>> labelList(@QueryMap Map<String, Object> map);

    /**
     * 标注包详情
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @GET("label/{id}")
    Observable<BaseResponse<LableBean>> labelDetail(@Path("id") String id, @QueryMap Map<String, Object> map);

    /**
     * 消息列表
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @GET("remind")
    Observable<BaseResponse<List<NewsBean>>> newsList(@QueryMap Map<String, Object> map);

    /**
     * 数据字典
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @GET("dictionary")
    Observable<BaseResponse<Object>> dictionaryList(@QueryMap Map<String, Object> map);

    /**
     * 标注包新增
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @POST("label")
    Observable<BaseResponse<Object>> addLabel(@Body RequestBody body);

    /**
     * 样本数量
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @GET("sample/size")
    Observable<BaseResponse<String>> getSample(@QueryMap Map<String, Object> map);

    /**
     * 2.15.1心音样本列表
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @GET("sample")
    Observable<BaseResponse<YangbenBean>> getSampleList(@QueryMap Map<String, Object> map);

    /**
     * 用户列表
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @GET("user")
    Observable<BaseResponse<UserBean>> getUser(@QueryMap Map<String, Object> map);

    /**
     * 2.16.4标注包自动新增
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @POST("label?rule=1")
    Observable<BaseResponse<Object>> addLabelZd(@Body RequestBody body);

    /**
     * 2.16.4标注包自动新增
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @POST("label")
    Observable<BaseResponse<Object>> addLabelSd(@Body RequestBody body);

    /**
     * 疑难样本数量
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @GET("difficult")
    Observable<BaseResponse<YangbenBean>> getDifficult(@QueryMap Map<String, Object> map);


    /**
     * 2.16.4标注包自动新增
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @POST("audit?rule=1")
    Observable<BaseResponse<Object>> addAuditZd(@Body RequestBody body);

    /**
     * 2.16.4标注包手动新增
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @POST("audit")
    Observable<BaseResponse<Object>> addAuditSd(@Body RequestBody body);

    /**
     * 2.19.4查询审核包详情
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @GET("audit/{id}")
    Observable<BaseResponse<Object>> getAuditDetail(@Path("id") String id, @QueryMap Map<String, Object> map);

    /**
     * 2.16.6查询标注包详情(工作台)
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @GET("label/{id}")
    Observable<BaseResponse<Object>> getLabelDetail(@Path("id") String id, @QueryMap Map<String, Object> map);

    /**
     * 2.15.7查询样本分割区间
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @GET("sample/{id}")
    Observable<BaseResponse<Object>> getSampleSection(@Path("id") String id, @QueryMap Map<String, Object> map);

    /**
     * cha询样本单个标注详情
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @GET("label/{id}/sample/{sampleId}/mark")
    Observable<BaseResponse<MarkDetailBean>> getMarkDetail(@Path("id") String id, @Path("sampleId") String sampleId, @QueryMap Map<String, Object> map);

    /**
     * cha询样本所有标注详情
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @GET("label/{id}/sample/{sampleId}/mark")
    Observable<BaseResponse<List<MarkDetailBean>>> getMarkDetasils(@Path("id") String id, @Path("sampleId") String sampleId);

    /**
     * 下载
     *
     * @param fileType
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @GET("file/{fileType}")
    Observable<BaseResponse<Object>> downloadFile(@Path("fileType") String fileType, @QueryMap Map<String, Object> map);

    /**
     * .2.16.18更新用户标注信息
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @PUT("label/{id}/sample/{sampleId}/mark/{markId}")
    Observable<BaseResponse<Object>> updataMark(@Path("id") String id, @Path("sampleId") String sampleId, @Path("markId") String markId, @Body RequestBody body);

    /**
     * 更新样本标注状态
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @PUT("label/{id}/user/{userId}/sample/{sampleId}")
    Observable<BaseResponse<Object>> updataMarks(@Path("id") String id, @Path("userId") String userId, @Path("sampleId") String sampleId, @Body RequestBody body);

    /**
     * 更新标注包状态（工作台）
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @PUT("label/{id}")
    Observable<BaseResponse<Object>> updataLabel(@Path("id") String id, @QueryMap Map<String, Object> map, @Body RequestBody body);

    /**
     * 2.19.8查询审核标注详情
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @GET("audit/{id}/sample/{sampleId}/mark")
    Observable<BaseResponse<MarkDetailBean>> getAuditDetail(@Path("id") String id, @Path("sampleId") String sampleId, @QueryMap Map<String, Object> map);

    /**
     * 2.19.9更新用户审核信息
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @PUT("audit/{id}/sample/{sampleId}/mark/{markId}")
    Observable<BaseResponse<Object>> updateAuditDetail(@Path("id") String id, @Path("sampleId") String sampleId, @Path("markId") String markId, @Body RequestBody body);

    /**
     * 2.19.9更新用户审核信息
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @POST("arbitration")
    Observable<BaseResponse<Object>> addArbitration(@Body RequestBody body);

    /**
     * 2.19.6审核包状态更新
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @PUT("audit/{id}")
    Observable<BaseResponse<Object>> updataAudits(@Path("id") String id, @Body RequestBody body);

    /**
     * 2.19.7更新样本审核状态
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @PUT("audit/{id}/user/{userId}/sample/{sampleId}")
    Observable<BaseResponse<Object>> updataAudit(@Path("id") String id, @Path("userId") String userId, @Path("sampleId") String sampleId, @Body RequestBody body);

    /**
     * 2.19.8查询仲裁详情
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @GET("arbitration/{id}/sample/{sampleId}/mark/{markId}")
    Observable<BaseResponse<MarkDetailBean>> getArbitrationDetail(@Path("id") String id, @Path("sampleId") String sampleId, @Path("markId") String markId);

    /**
     * 2.20.3查询仲裁详情
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @GET("arbitration/{id}")
    Observable<BaseResponse<Object>> getArbitrationDetails(@Path("id") String id, @QueryMap Map<String, Object> map);

    /**
     * 2.20.4作废
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @DELETE("arbitration/{id}")
    Observable<BaseResponse<Object>> deleteArbitration(@Path("id") String id, @QueryMap Map<String, Object> map);

    /**
     * 2.20.6更新用户仲裁信息
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @PUT("arbitration/{id}/sample/{sampleId}/mark/{markId}")
    Observable<BaseResponse<Object>> updataArbitration(@Path("id") String id, @Path("sampleId") String sampleId, @Path("markId") String markId, @Body RequestBody body);

    /**
     * 2.12.3 查询用户详情
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @GET("user/{id}")
    Observable<BaseResponse<User>> getUserInfo(@Path("id") String id, @QueryMap Map<String, Object> map);

    /**
     * 2.12.4用户更新
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @PUT("user/{id}")
    Observable<BaseResponse<Object>> updateUserInfo(@Path("id") String id, @Body RequestBody body);

    /**
     * 2.12.3 获取医院列表
     *
     * @param
     * @return
     */
    @Headers({"Content-Type:application/json"})
    @GET("hospitalMessage")
    Observable<BaseResponse<Hospitalbean>> getHospital(@QueryMap Map<String, Object> map);


}
